<template>
	<view class="position-relative">
		<video :src="url" controls autoplay :style="'height:'+windowHeight+'px'" style="width: 750rpx;"></video>
		<view class="position-absolute" style="left: 40rpx;top:60rpx" @click="back">
			<text class="iconfont icon-guanbi1 text-white" style="font-size: 50rpx;"></text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				url:'',
				windowHeight:500
			}
		},
		onLoad(e) {
			this.url = e.url
			console.log('this.url',this.url);
			if(e.url === ''){
				this.back()
				return uni.showToast({
					title:'非法视频',
					icon:'none'
				})
			}
			// 动态获取高度
			let res = uni.getSystemInfoSync()
			this.windowHeight = res.windowHeight
		},
		methods: {
			// 关闭返回
			back(){
				uni.navigateBack({})
			}
		}
	}
</script>

<style>
/*每个页面公共css */
@import '@/common/free.css';
@import '@/common/common.css';
@import '@/common/comicon.css';
@import '@/common/free-icons.css';

</style>
